//
//  NSObject+KDTool.h
//  iOSKdUser
//
//  Created by WYC on 2018/1/2.
//  Copyright © 2018年 KD. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (Tool)

typedef void (^leftAlertBlock)(UIAlertAction * _Nonnull action);

typedef void (^rightAlertBlock)(UIAlertAction * _Nonnull action);

typedef void (^cancelAlertBlock)(UIAlertAction * _Nonnull action);

typedef void (^leftTextAlertBlock)(UIAlertAction * _Nonnull action,NSArray * _Nullable array);

typedef void (^rightTextAlertBlock)(UIAlertAction * _Nonnull action,NSArray * _Nullable array);


-(NSAttributedString *_Nullable)changeAttributedString:(NSArray *_Nullable)changeStrings attributes:(NSArray *_Nullable)attributes;

-(NSString *_Nullable)clearCityName;

+(NSMutableDictionary *_Nonnull)getAttributes:(NSArray *_Nullable)attributes;

+(void)showLeftTitleDestructiveAlertControllerTitle:(NSString *_Nonnull)title Message:(NSString *_Nonnull)message LeftTitle:(NSString *)title1  rightTile:(NSString *_Nonnull)title2 leftBlock:(leftAlertBlock _Nullable )leftBlock rightBlock:(rightAlertBlock _Nullable )rightBlock viewController:(UIViewController *_Nonnull)vc;

+(void)showActionSheetControllerTitle:(NSString *)title Message:(NSString *)message title1:(NSString *)title1  title2:(NSString *)title2 cancel:(NSString *)title3 block1:(leftAlertBlock)leftBlock block2:(rightAlertBlock)rightBlock cancelBlock:(cancelAlertBlock)cancelBlock viewController:(UIViewController *)vc;


+(NSString *_Nonnull)checkStringNull:(id _Nullable )object;

+(BOOL)checkStringIsNull:(id _Nullable )object;


+(UIAlertController *)showTextFieldDestructiveLeftTitleAlertControllerTitle:(NSString *)title Message:(NSString *)message LeftTitle:(NSString *)title1  rightTile:(NSString *)title2 leftBlock:(leftTextAlertBlock)leftBlock rightBlock:(rightTextAlertBlock)rightBlock placeholder:(NSString *)placeholder  text:(NSString *)text viewController:(UIViewController *)vc;


+(void)showCancelTitleAlertControllerTitle:(NSString *)title Message:(NSString *)message title:(NSString *)title leftBlock:(leftAlertBlock)leftBlock viewController:(UIViewController *)vc;


+(NSString *)getDateStringWithDateSince1970:(NSTimeInterval)time format:(NSString *)format;
+(NSString *)getDateStringWithDate:(NSDate *)date format:(NSString *)format;

+(void)setView:(UIView *)view BordeWidth:(CGFloat)width cornerRadius:(CGFloat)cornerRadius bordeColor:(UIColor *)color maskToBounds:(BOOL)maskToBounds;
+(void)showActionSheetControllerTitle:(NSString *)title Message:(NSString *)message title1:(NSString *)title1  title2:(NSString *)title2 title3:(NSString *)title3 block1:(leftAlertBlock)leftBlock block2:(rightAlertBlock)rightBlock cancelBlock:(cancelAlertBlock)cancelBlock viewController:(UIViewController *)vc;
+ (UIViewController *)getCurrentVC;

@end
